<template>
  <el-card class="avue_height">
    <el-row :gutter="12" class="goBusiness">
      <el-col :span="4">
        <el-card :shadow="businessType=='02'?'always':'hover'" style="cursor: pointer;">
          <div @click="goBusiness('02')">
            <h3 style="margin:0;padding:10px 0;text-align:center">商超</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="4">
        <el-card :shadow="businessType=='03'?'always':'hover'" style="cursor: pointer;">
          <div @click="goBusiness('03')">
            <h3 style="margin:0;padding:10px 0;text-align:center">洗衣</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="4">
        <el-card :shadow="businessType=='04'?'always':'hover'" style="cursor: pointer;">
          <div @click="goBusiness('04')">
            <h3 style="margin:0;padding:10px 0;text-align:center">家政</h3>
          </div>
        </el-card>
      </el-col>
      <el-col :span="4">
        <el-card :shadow="businessType=='05'?'always':'hover'" style="cursor: pointer;">
          <div @click="goBusiness('05')">
            <h3 style="margin:0;padding:10px 0;text-align:center">咖吧</h3>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <div>
      <search
        :keyName="keyName"
        :businessType="businessType"
        @search="search"
        @resetSearch="resetSearch"
        ref="search"
      />
      <div class="content">
        <div class="table_caozuoAdd">
          <el-button type="primary" icon="plus" @click="addShangpin">新增商品</el-button>
          <!-- <el-button type="primary" icon="plus" @click="drShangpin">导入商品</el-button> -->
        </div>
      </div>
      <el-tabs v-model="keyName" type="card" @tab-click="callback">
        <el-tab-pane :label="tab.approved" name="02">
          <approved ref="approved" @trigger="trigger" />
        </el-tab-pane>
        <el-tab-pane :label="tab.toBeSubmitted" name="00">
          <toBeSubmitted ref="toBeSubmitted" @trigger="trigger" />
        </el-tab-pane>
        <el-tab-pane :label="tab.toBereviewed" name="01">
          <toBereviewed ref="toBereviewed" @trigger="trigger" />
        </el-tab-pane>
        <el-tab-pane :label="tab.rejected" name="03">
          <rejected ref="rejected" @trigger="trigger" />
        </el-tab-pane>
      </el-tabs>
    </div>
  </el-card>
</template>

<script src='./index'></script>

<style lang="scss">
.content {
  .table_caozuoAdd {
    margin: 10px 0px 20px 0px;
  }
}
.goBusiness {
  margin: 10px 0;
  .el-card__body {
    padding: 0;
  }
  .el-card.is-always-shadow,
  .el-card.is-hover-shadow:focus,
  .el-card.is-hover-shadow:hover {
    box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.5)!important
  }
}
</style>